<?php

/**
 * User Model
 *
 * @author     Thibaut Cromphaut and Dimitry Dierickx
 * @copyright  Copyright (c) 2011 Safti-Kado
 */
class Application_Model_User extends Ahs_Model
{

    /**
     * @var integer
     */
    protected $_id;
    /**
     * @var string
     */
    protected $_email;
    /**
     * @var string
     */
    protected $_password;
    /**
     * @var string
     */
    protected $_givenname;
    /**
     * @var string
     */
    protected $_familyname;

    #TIP: Gebruik ALT+INSERT (Win) of CTRL+i (Mac) om getters en setters te genereren
    /**
     * @return integer
     */
    public function getId() {
        return $this->_id;
    }

    /**
     * @param string $id
     */
    public function setId($id)
    {
        $this->_id = $id;
    }

    /**
     * @return string
     */
    public function getEmail()
    {
        return $this->_email;
    }

    /**
     * @param string $email
     */
    public function setEmail($email)
    {
        $this->_email = $email;
    }

    /**
     * @return string
     */
    public function getPassword()
    {
        return $this->_password;
    }

    /**
     * @param string $password
     */
    public function setPassword($password)
    {
        $this->_password = Ahs_Utility::hash($password);
    }

    /**
     * @return string
     */
    public function getGivenname()
    {
        return $this->_givenname;
    }

    /**
     * @param string $givenname
     */
    public function setGivenname($givenname)
    {
        $this->_givenname = $givenname;
    }

    /**
     * @return string
     */
    public function getFamilyname()
    {
        return $this->_familyname;
    }

    /**
     * @param string $familyname
     */
    public function setFamilyname($familyname)
    {
        $this->_familyname = $familyname;
    }

}
